<template>
	<view class="estateIndex">
		<!-- #ifdef APP-PLUS  || H5 -->
		<nav-bars class="nav_bar navBarApp" :bgColor="scrollData >= 200?'#fff':''">
			<view class="nav_center">
				<view class="followBtn" @click="toFollow(estateInfo.follow_status)"
					:class="{'active':estateInfo.follow_status==1}">{{estateInfo.follow_status==1?"已关注":"关注"}}</view>
			</view>
		</nav-bars>
		<!-- #endif -->
		<!-- #ifdef MP-WEIXIN -->
		<navBar class="nav_bar" isBack :backColor="scrollData >= 200?'#000':'#fff'"
			:background="scrollData >= 200?'#fff':'rgba(255,255,255,0)'">
			<view class="nav_center" slot="center">
				<view class="followBtn" @click="toFollow(estateInfo.follow_status)"
					:class="{'active':estateInfo.follow_status==1}">{{estateInfo.follow_status==1?"已关注":"关注"}}</view>
			</view>
		</navBar>
		<!-- #endif -->
		<view class="index">
			<view class="BannerView">
				<view>
					<view class="Banner" v-if="bannerIndex == 1">
						<!-- 视频 -->
						<swiper :indicator-dots="false" :autoplay="false" :circular="true" :interval="3000"
							:duration="1500" @change='VideoBannerChange'>
							<swiper-item v-for="(item,index) in videoList" :key="index">
								<video id="myvideo" bindplay='playVideo' style="width: 100%;height: 100%;"
									:show-center-play-btn='true' :autoplay='true' :src="item.path">
								</video>
							</swiper-item>
						</swiper>
						<view class="ViewDot">
							<view class="ViewDotItem">{{VideIndex+1}}/{{videoList.length}}</view>
						</view>
					</view>
					<view class="Banner" v-else>
						<swiper :indicator-dots="false" :autoplay="true" :circular="true" :interval="3000"
							:duration="1500" @change='imgBannerChange'>
							<swiper-item v-for="(item,index) in thumb_url" :key="index">
								<image :src="item.path"></image>
							</swiper-item>
						</swiper>
						<view class="ViewDot">
							<view class="ViewDotItem">{{imgIndex+1}}/{{thumb_url.length}}</view>
						</view>
					</view>
					<view class="BannerDot">
						<view v-for="(Item,Idenx) in navTop" :key="Idenx"
							:class="['BannerDotItem',bannerIndex == Idenx?'Click':'']" @click="BannerDotClick(Idenx)">
							{{Item}}
						</view>
					</view>
				</view>
			</view>
			<!-- 详情信息 -->
			<view class="Message">
				<view class="MessageTitle">{{estateInfo.name}}</view>
				<view class="MessageTips">
					<!-- <view class="MessageNow">在售</view> -->
					<view class="MessageList" v-for="(item,index) in estateInfo.house_tag" :key="index">
						{{item.name}}
					</view>
				</view>
				<view class="MessageData">
					<view class="MessageOne">
						<view class="MessageRed">{{estateInfo.area_price}}元/平</view>
						<view class="MessageMian">参考单价</view>
					</view>
					<view class="MessageOne">
						<view class="MessageText">{{estateInfo.start_area}}-{{estateInfo.end_area}}m²</view>
						<view class="MessageMian">房屋面积</view>
					</view>
					<view class="MessageOne">
						<view class="MessageText">{{estateInfo.sale_num}}</view>
						<view class="MessageMian">目前在售</view>
					</view>
				</view>
				<view class="MessageOpen">
					<view class="MessageNav">
						<text class="MessageNavText">开盘：</text>
						<text>{{estateInfo.sale_time}}年</text>
					</view>
					<view class="MessageNav">
						<text class="MessageNavText">地址：</text>
						<!-- .substring(start,end) -->
						<text class="omit-1">{{estateInfo.address}}</text>
					</view>
					<view class="MessageIcon" @click="getAddress">
						<image src="https://cos.ryz1620.com/liankun/static/locationOne.png"></image>
					</view>
				</view>
			</view>
			<!-- icon列表 -->
			<view class="IconView">
				<view class="IconList">
					<view class="IconItem" v-for="(item,index) in navList" :key="index" @click="toResourRecom(index)">
						<view class="IconImage">
							<image :src="baseImg+item.img"></image>
						</view>
						<view class="IconTitle">{{item.text}}</view>
					</view>
				</view>
			</view>
			<!-- 视频推荐 -->
			<view class="livePlay">
				<view class="livePlayView">
					<view class="livePlayMain">
						<view class="livePlayItem" v-for="(item,index) in LiveList" :key="index"
							@click="openLive(item,index)">
							<view class="livePlaybg"
								:style="{background:'url('+ item.cover.path +')','background-repeat': 'no-repeat','background-size': '100% 100%',}">
								<view class="livePlay_left">
									<view>
										<view class="livePlay_title">{{item.title}}</view>
										<view class="livePlay_des">装修材料直通车</view>
									</view>
									<view class="livePlay_message">材料中心 | 孙红雷</view>
								</view>
								<view>
									<view class="livePlay_leftTop">
										<view class="livePlay_ing"></view>
										<!-- <view class="livePlay_back" >
												<image src="https://cos.ryz1620.com/liankun/static/newHome/video.png" ></image>
											</view> -->
										<view class="livePlay_text">视频中</view>
									</view>
									<view class="livePlay_rightTop">家居&建材</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 户型推荐 -->
			<view class="RoomView">
				<view class="commonNav" @click="toHouseRecom">
					<view class="commonTitle">户型推荐</view>
					<view class="commonMore">
						<text></text>
						<text class="iconfont icon-more" style="margin-top: -2rpx;"></text>
					</view>
				</view>
				<!-- <view class="RoomList">
					<view :class="['RoomItem',RoomIndex == idx?'RoomItemClick':'']" v-for="(item,idx) in RoomList"
						:key="idx" @click="RoomListClick(idx)">{{item.lable}}</view>
				</view> -->
				<view class="i_rCan">
					<view class="i_rList">
						<view class="i_rItem" v-for="(item,index) in recomHouseList" :key="index"
							@click="toHouseRecomDetail(item.id)">
							<view class="i_rImage">
								<image :src="item.thumb_url[0].path">
								</image>
							</view>
							<view class="TextView">
								<view class="i_rText omit-1">{{item.title}}</view>
								<view class="i_rFee"><text class="fs-24 ft-bold mR-4">约{{item.sale_price}}</text>万/套
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>

			<!-- 装修推荐 -->
			<view class="renovation">
				<view class="commonNav" @click="toCaseList">
					<view class="commonTitle">装修案例</view>
					<view class="commonMore">
						<text></text>
						<text class="iconfont icon-more" style="margin-top: -2rpx;"></text>
					</view>
				</view>
				<scroll-view class="coupon_Column_List" scroll-x>
					<view class="scoll-wrapper">
						<view class="floor-item" v-for="(item, index) in caseList" :key="index"
							@click="toCaseDetail(item.id)">
							<view class="ItemImage">
								<image :src="item.thumb_url[0].path"></image>
							</view>
							<view class="Itemtext">
								<view class="ItemMes">{{item.house_type}} | {{item.area}}m² | {{item.offer*1}}万
								</view>
								<view class="ItemTitle ellipsisText1">{{item.title}}</view>
							</view>
						</view>
					</view>
				</scroll-view>
			</view>
			<!-- 设计师推荐 -->
			<view class="renovation">
				<view class="commonNav">
					<view class="commonTitle">设计师推荐</view>
					<view class="commonMore" @click="toDesignRecom">
						<text></text>
						<text class="iconfont icon-more" style="margin-top: -2rpx;"></text>
					</view>
				</view>
				<scroll-view class="coupon_Column_List" scroll-x>
					<view class="scoll-wrapper">
						<view class="floor-item" v-for="(item, index) in designList" :key="index"
							@click="toDesignDetail(item.id)">
							<view class="ItemImage">
								<image :src="item.avatar.path"></image>
							</view>
							<view class="Itemtext">
								<view class="designView">
									<view class="designImage">
										<image :src="item.back_thumb_url.path">
										</image>
									</view>
									<view>
										<view class="designTitle">{{item.title}}</view>
										<view class="designMes">从业 {{item.employ_year}}年 | 方案 {{item.case_num}}
										</view>
										<view class="designPirce">
											{{item.start_offer}}-{{item.end_offer}}
											<text>/m²</text>
										</view>
									</view>
								</view>
								<view class="designTips">
									<view class="designItem" v-for="(items,indexs) in item.design_style"
										v-if="indexs < 3" :key="indexs">
										{{items.name}}
									</view>
								</view>
							</view>
						</view>
					</view>
				</scroll-view>
			</view>
			<!-- 家居推荐 -->
			<view class="renovation">
				<view class="commonNav">
					<view class="commonTitle">家居推荐</view>
					<view class="commonMore" @click="toFurniRecom">
						<text></text>
						<text class="iconfont icon-more" style="margin-top: -2rpx;"></text>
					</view>
				</view>
				<scroll-view class="coupon_Column_List" scroll-x>
					<view class="scoll-wrapper">
						<!-- `/pages_mall/pages/mall/goods_details/goods_details?id=${items.product_id}` -->
						<view class="floor-item" v-for="(item, index) in furniList" :key="index"
							@click="GoGoodsDetaile(item,index)">
							<view class="homeImage">
								<image :src="item.main_imgurl.path"></image>
							</view>
							<view class="homeView">
								<view class="homeTitle ellipsisText">{{item.product_title}}</view>
								<view class="homePirce">¥{{item.price}}</view>
							</view>
						</view>
					</view>
				</scroll-view>
			</view>
			<!-- 用户点评-->
			<view class="comment">
				<view class="commonNav">
					<view class="commonTitle">用户点评（{{estateInfo.comment_num}}）</view>
					<view class="commonMore" @click="toResourRecom(5)">
						<text></text>
						<text class="iconfont icon-more" style="margin-top: -2rpx;"></text>
					</view>
				</view>
				<view class="commentList" v-for="(item,index) in evalList" :key="index">
					<view class="commentTop">
						<view class="commentHead">
							<view class="commentimage">
								<image :src="item.user_id.avatar.path"></image>
							</view>
							<view class="commentName">{{item.user_id.username}}</view>
						</view>
						<view class="commentTime">{{$utils.getFormatDate(item.create_time*1000,'yyyy-MM-dd')}}
						</view>
					</view>
					<view class="commentMain">{{item.content}}</view>
					<view class="commentBottom">
						<view class="commentPic" v-for="(item1,index1) in item.thumb_url" :key="index1">
							<image @tap='previewImage(item.thumb_url,index1)' :src="item1.path"></image>
						</view>
						<!-- <view class="commentPic" v-if="!Array.isArray(item.thumb_url) && item.thumb_url">
							<image @tap='previewImagObj(item.thumb_url)' :src="item.thumb_url.path"></image>
						</view> -->
					</view>
				</view>
				<view class="commonBtn" @click="toEvalPub">
					<view class="commonBtnView">
						<u-icon name="edit-pen" color="#C3AB7C" size="28"></u-icon>
						<text>我要点评</text>
					</view>
				</view>
			</view>
			<!-- 大家都在问 -->
			<view class="problem">
				<view class="commonNav">
					<view class="commonTitle">大家都在问（{{askInfo.question_num}}）</view>
					<view class="commonMore" @click="toAskList">
						<text></text>
						<text class="iconfont icon-more" style="margin-top: -2rpx;"></text>
					</view>
				</view>
				<view class="problemView">
					<view class="problemItem" v-for="(item,index) in askInfo.question_list" :key="index">
						<view class="problemIcon">问</view>
						<view style="flex: 1;">
							<view class="problemTitle">{{item.title}}</view>
							<view class="problemBack">
								<view class="ellipsisText1 problemReturn">
									{{ item.answer.length> 0 ?item.answer[0].content:''}}
								</view>
								<view class="problemNum" @click="toQuestDetail(item.id)">
									{{item.answer_num}}
									<text>个回答</text>
								</view>
							</view>
						</view>
					</view>
				</view>

				<view class="commonBtn">
					<view class="commonBtnView">
						<u-icon name="edit-pen" color="#C3AB7C" size="28"></u-icon>
						<text @click="toAsk">我要提问</text>
					</view>
				</view>
			</view>
		</view>
		<!-- 底部导航 -->
		<view>
			<u-tabbar v-model="current" :list="list" @change="tabChange" :border-top="true" inactive-color='#333'
				active-color='#333' :mid-button="false"></u-tabbar>
		</view>
	</view>
</template>

<script>
	//import navBars from "@/components/navBars/index";
	import lBarrage from '@/components/l-barrage/l-barrage.vue'
	import service_mall from '@/service/mall.js'
	import service_oneN from '@/service/oneN.js'
	export default {
		components: {
			lBarrage,
			//navBars
		},
		data() {
			return {
				baseImg: 'http://manager.ryz1620.com',
				navTop: ['图片', '视频'],
				bannerIndex: 0, //视频还是图片轮播点
				imgIndex: 0, //图片轮播
				imgArrList: [],
				VideIndex: 0, //视频轮播
				//icon信息
				navList: [{
						img: '/static/onePlusN/nav1.png',
						text: '房源推荐',
					},
					{
						img: '/static/onePlusN/nav2.png',
						text: '装修案例',
					},
					{
						img: '/static/onePlusN/nav3.png',
						text: '设计师推荐',
					},
					{
						img: '/static/onePlusN/nav4.png',
						text: '家居推荐',
					},
					{
						img: '/static/onePlusN/nav5.png',
						text: '小区绿化',
					},
					{
						img: '/static/onePlusN/nav6.png',
						text: '客户评价',
					},
					{
						img: '/static/onePlusN/nav7.png',
						text: '大家都在问',
					},
					{
						img: '/static/onePlusN/nav8.png',
						text: '在线客服',
					},
				],
				LiveList: [], //视频列表
				//户型信息
				RoomList: [{
						lable: '一室'
					},
					{
						lable: '二室'
					},
					{
						lable: '三室'
					},
					{
						lable: '四室'
					}
				],
				RoomIndex: 0, //户型下表
				scrollData: 0, //滚动距离大小
				// 底部固定tabs
				list: [
					// {
					// 	iconPath: "kefu-ermai",
					// 	selectedIconPath: "kefu-ermai",
					// 	text: '在线咨询',
					// 	customIcon: false,
					// },https://cos.ryz1620.com/liankun/static/playerIcon.png
					{
						iconPath: "play-circle",
						selectedIconPath: "play-circle",
						text: '视频',
						// midButton: true,
						customIcon: false,
					},
					{
						iconPath: "phone",
						selectedIconPath: "phone",
						text: '电话咨询',
						customIcon: false,
					},

				],
				current: 0, // 底部tabs下标
				estate_id: null, //小区id
				estateInfo: {}, //小区信息
				recomHouseList: [], //户型推荐
				caseList: [], //案例推荐
				designList: [], //设计师推荐
				furniList: [], //家居推荐
				evalList: null, //用户评价
				evalinfo: null, //用户评价信息
				askInfo: [], //大家都在问
				isShow: false,
				scrollTop: 0,
				videoList: [], //视频
				thumb_url: [], //轮播图
			}
		},
		onReady() {
			var value = uni.getStorageSync('LiveConfig')
			this.list[0].text = value
			// console.log(value);
		},
		onLoad(options) {
			this.$utils.getUrl()
			this.estate_id = options.estate_id
			// this.estate_id = 150
			// this.getLiveplayList()
			this.getEstateDetail() //小区详情
			this.getHouseList() //户型推荐
			this.getCase() //案例推荐
			this.getDesign() //设计师推荐
			this.getFurni() //家居推荐
			this.getEval() //客户评价
			this.getAsk() //提问列表]

		},
		onShow() {
			// if(this.isShow == true){
			this.getEstateDetail() //小区详情
			this.getHouseList() //户型推荐
			this.getFurni() //家居推荐
			this.getEval() //客户评价
			this.getAsk() //提问列表
			this.getDesign() //设计师推荐
			this.getCase() //案例推荐
			// }
		},
		onPageScroll(e) {
			// console.log(e.scrollTop)
			this.scrollData = e.scrollTop
			// if (e.scrollTop >= 600) {
			// 	this.scrollStatus = false
			// } else {
			// 	this.scrollStatus = true
			// }
		},
		methods: {
			// // 获取轮播
			// banners() {
			// 	service_mall.index_getBanner({
			// 		type: 31
			// 	}).then(res => {
			// 		if (res.code == 1) {
			// 			console.log(res.data);
			// 			this.imgArrList = res.data
			// 		}
			// 	});
			// },
			GoGoodsDetaile(item, index) {
				console.log(item);
				uni.navigateTo({
					url: '/pages_mall/pages/mall/goods_details/goods_details?id=' + item.id
				})
				// `/pages_mall/pages/mall/goods_details/goods_details?id=${items.product_id}`
			},
			// 图片的banner
			imgBannerChange(e) {
				this.imgIndex = e.detail.current
			},
			// 视频的banner
			VideoBannerChange(e) {
				this.VideIndex = e.detail.current
			},
			// 轮播区分是图片还是视频
			BannerDotClick(row) {
				// console.log(row);
				this.bannerIndex = row
			},
			// 户型推荐户型选择
			RoomListClick(row) {
				this.RoomIndex = row
			},
			tabChange(e) {
				var that = this
				// console.log(e);
				switch (e) {
					// case 0:
					// 	// console.log('今天是星期日');
					// 	this.$page.jumpPage('/pages_customer/pages/index')
					// 	break;
					case 0:

						// this.$page.jumpTab('/pages/player/index')
						uni.switchTab({
							url: '/pages/player/index'
						})
						break;
					case 1:
						uni.makePhoneCall({
							phoneNumber: that.estateInfo.phone //仅为示例，并非真实的电话号码
						})
						break;
						// default:
				}
			},

			// 获取小区详情
			getEstateDetail() {
				var that = this
				service_oneN.getEstateDetail({
					estate_id: that.estate_id
				}).then(res => {
					if (res.code == 1) {
						// console.log(res, '小区详情');
						that.videoList = res.data.video;
						res.data.sale_time = that.$utils.getFormatDate(res.data.sale_time * 1000, 'yyyy')
						that.estateInfo = res.data;
						that.thumb_url = res.data.thumb_url;
						that.estateInfo.address = res.data.address.substring(0, 10) + '...';
						//that.estateInfo = res.data ? res.data : {};
					}
				})
			},
			// 视频推荐列表
			getLiveplayList() {
				var that = this
				service_mall.getLiveplayList()
					.then(res => {
						if (res.code == 1) {
							that.LiveList = res.data
						} else {
							this.$utils.showErr({
								title: res.msg
							})
						}
					})
					.catch(err => {
						this.$utils.showErr()
					})
			},
			// 获取户型推荐列表
			getHouseList() {
				service_oneN.getHouse({
					estate_id: this.estate_id
				}).then(res => {
					// console.log(res, '户型推荐列表')
					if (res.code == 1) {
						this.recomHouseList = res.data ? res.data : []
					}
				})
			},
			// 获取案例推荐列表
			getCase() {
				service_oneN.getCase({
					estate_id: this.estate_id
				}).then(res => {
					if (res.code == 1) {
						this.caseList = res.data ? res.data : []

					}
				})
			},
			// 获取设计师推荐列表
			getDesign() {
				service_oneN.getDesign({
					estate_id: this.estate_id
				}).then(res => {
					// console.log(res, '设计师推荐')
					if (res.code == 1) {
						this.designList = res.data ? res.data : []
					}
				})
			},
			// 获取家居推荐列表
			getFurni() {
				service_oneN.getFurni({
					estate_id: this.estate_id
				}).then(res => {
					// console.log(res)
					if (res.code == 1) {
						this.furniList = res.data ? res.data : []
					}
				})
			},
			// 获取客户评价列表
			getEval() {
				let params = {
					estate_id: this.estate_id,
					page: this.evalPage,
					pagesize: this.evalPagesize
				}
				service_oneN.getEval(params).then(res => {
					// console.log(res, "评价列表")
					if (res.code == 1) {
						this.evalList = res.data.comment_list ? res.data.comment_list : [],
							this.evalinfo = res.data ? res.data : null
					}
				})
			},
			// 提问列表
			getAsk() {
				service_oneN.getAskList({
					estate_id: this.estate_id
				}).then(res => {
					// console.log(res, '大家都在问')
					if (res.code == 1) {
						this.askInfo = res.data ? res.data : []
					}
				})
			},
			// 关注小区
			toFollow(followStatus) {
				let status = followStatus == 0 ? 1 : 0
				if (followStatus == 1) {
					uni.showModal({
						content: '确定取消关注吗？',
						success: res => {
							if (res.confirm) {
								this.cancelFollow(status)
							}
						}
					})
				} else {
					this.cancelFollow(status)
				}
			},
			// 请取消关注等
			cancelFollow(status) {
				service_oneN.toFollow({
					estate_id: this.estate_id,
					status
				}).then(res => {
					console.log(res)
					if (res.code == 1) {
						if (status == 0) {
							uni.showToast({
								title: '已取消关注',
								icon: 'success'
							})
							this.getEstateDetail()
						} else {
							uni.showToast({
								title: '关注成功',
								icon: 'success'
							})
							this.getEstateDetail()
						}
					}
				})
			},
			previewImage(list, index) {
				// console.log(list);
				// console.log(index);
				let imgUrl = []
				list.map(item => {
					imgUrl.push(item.path)
				})
				uni.previewImage({
					current: index, //预览图片的下标
					urls: imgUrl //预览图片的地址，必须要数组形式，如果不是数组形式就转换成数组形式就可以
				});
			},
			previewImagObj(list) {
				// console.log(list);
				var arr = []
				arr.push(list.path)
				uni.previewImage({
					current: 0, //预览图片的下标
					urls: arr //预览图片的地址，必须要数组形式，如果不是数组形式就转换成数组形式就可以
				});
			},
			// 图片预览
			toViewImg(index) {
				let imgArr = this.thumb_url
				let urlType = Array.isArray(imgArr)
				let imgUrl = []
				if (urlType) {
					imgArr.map(item => {
						imgUrl.push(item.path)
					})
				} else {
					imgUrl.push(imgArr.path)
				}

				uni.previewImage({
					current: index, //预览图片的下标
					urls: imgUrl //预览图片的地址，必须要数组形式，如果不是数组形式就转换成数组形式就可以
				});
			},
			getAddress(data) {
				var that = this
				// console.log(that.estateInfo)
				uni.openLocation({
					longitude: Number(that.estateInfo.lng), //经度或纬度必须是number类型
					latitude: Number(that.estateInfo.lat),
					address: that.estateInfo.address,
					scale: 18
				})
			},
			// 选择nav
			selectItem(index) {
				this.itemIndex = index
				console.log(this.itemIndex)
			},
			//视频推荐
			openLive(item, index) {
				let url = encodeURIComponent(item.play_url)
				uni.navigateTo({
					url: '/pages_player/pages/playerDetailes/index?url=' + url
				});
			},

			// 进入户型推荐
			toHouseRecom() {
				uni.navigateTo({
					url: './houseRecom/houseRecom?estate_id=' + this.estate_id
				})
			},



			// 进入户型详情
			toHouseRecomDetail(id) {
				uni.navigateTo({
					url: 'houseRecom/houseDetail?house_id=' + id
				})
			},

			// 打开小区简介诶
			openInfo() {
				this.estateShow = true
			},
			// 打开地图弹框
			openMap() {
				this.mapShow = true
			},
			// 关闭地图弹框
			toCloseMap() {
				this.mapShow = false
			},


			// 进入案例推荐列表
			toCaseList() {
				uni.navigateTo({
					url: '/pages_design/pages/design/demo/list?estate_id=' + this.estate_id
				})
			},

			// 进入案例详情
			toCaseDetail(id) {
				uni.navigateTo({
					url: '/pages_design/pages/design/demo/demo?caseId=' + id
				})
			},

			// 进入设计师推荐
			toDesignRecom() {
				uni.navigateTo({
					url: '/pages_onePlusN/pages/onePlusN/designRecom/designRecom?estate_id=' + this.estate_id
				})

				// uni.switchTab({
				// 	url: '/pages/design/index/index'
				// })
			},

			// 跳转到设计师详情
			toDesignDetail(id) {
				uni.navigateTo({
					url: '/pages_design/pages/design/personal/personal?designerId=' + id
				})
			},

			// 进入家居推荐
			toFurniRecom() {
				uni.navigateTo({
					// estateIndex
					url: '/pages_onePlusN/pages/onePlusN/furniRecom/furniRecom?estate_id=' + this.estate_id
				})
			},


			// 导航跳转
			toResourRecom(index) {
				if (index == 0) { //房源推荐
					uni.navigateTo({
						url: 'resourRecom/resourRecom?estate_id=' + this.estate_id
					})
				} else if (index == 1) { //装修案例
					uni.navigateTo({
						url: '/pages_design/pages/design/demo/list?estate_id=' + this.estate_id
					})
				} else if (index == 2) { //设计师推荐
					uni.navigateTo({
						// switchTab url: '/pages/design/index/index'
						url: '/pages_onePlusN/pages/onePlusN/designRecom/designRecom?estate_id=' + this.estate_id
					})
				} else if (index == 3) { //家居推荐
					uni.navigateTo({
						url: '/pages_onePlusN/pages/onePlusN/furniRecom/furniRecom?estate_id=' + this.estate_id
					})
				} else if (index == 4) { //小区绿化
					uni.navigateTo({
						url: './estateGreen?estate_id=' + this.estate_id
					})
				} else if (index == 5) { //客户评价
					uni.navigateTo({
						url: `/pages_onePlusN/pages/onePlusN/evalList/evalList?estate_id=${this.estate_id}`
					})
				} else if (index == 6) { //大家都在问
					uni.navigateTo({
						url: `askList/askList?estate_id=${this.estate_id}`
					})
				} else if (index == 7) { //在线客服
					uni.navigateTo({
						url: '/pages_customer/pages/index?partner_type=root&partner_id=0'
					})
				}
			},

			//进入客户评价
			toEvalList() {
				uni.navigateTo({
					url: 'evalList/evalList?estate_id?' + this.estate_id
				})
			},

			// 进入发表点评
			toEvalPub() {
				uni.navigateTo({
					url: 'evalList/evalPublish?estate_id=' + this.estate_id
				})
			},


			// 进入大家都在问
			toAskList() {
				uni.navigateTo({
					url: `askList/askList?estate_id=${this.estate_id}`
				})
			},

			// 回答详情
			toQuestDetail(id) {
				uni.navigateTo({
					url: `askList/questDetail?question_id=${id}&estate_id=${this.estate_id}`
				})
			},

			//提问按钮
			toAsk() {
				uni.navigateTo({
					url: `./askList/putQuest?estate_id=${this.estate_id}`
				})
			},


		}
	}
</script>

<style lang="scss">
	page {
		background: #F8F8F8;
	}

	//只显示文字行数
	.ellipsisText {
		text-overflow: -o-ellipsis-lastline;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		white-space: pre-line;
	}

	.ellipsisText1 {
		text-overflow: -o-ellipsis-lastline;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 1;
		-webkit-box-orient: vertical;
	}

	// 公共按钮
	.commonBtn {
		padding: 0 32rpx;

		.commonBtnView {
			height: 92rpx;
			width: 100%;
			background: rgba(195, 171, 124, .1);
			display: flex;
			align-items: center;
			justify-content: center;

			text {
				margin-left: 8rpx;
				font-size: 28rpx;
				font-weight: 600;
				color: #C3AB7C;
			}
		}
	}

	// 公共标题
	.commonNav {
		padding: 12rpx 40rpx 14rpx 40rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;

		.commonTitle {
			font-size: 36rpx;
			font-weight: 600;
			line-height: 48rpx;
			color: #333;
		}

		.commonMore {
			font-size: 22rpx;
			font-weight: 400;
			line-height: 20rpx;
			color: #A0A0A0;
		}
	}

	// 导航关注
	.navBarApp {
		position: fixed;
		top: 0;
	}

	.nav_bar {
		width: 100%;
		z-index: 1000;

		.nav_center {
			width: 100%;
			display: flex;
			justify-content: flex-end;
			/*  #ifdef  APP-PLUS || H5  */
			margin-left: 450rpx;
			//top: var(--status-bar-height);
			/*  #endif  */
			/*  #ifdef  MP-WEIXIN  */
			padding-right: 36rpx;
			/*  #endif  */
			z-index: 1000;

			.followBtn {
				position: relative;
				text-align: center;
				font: 400 20rpx/48rpx PingFang SC;
				width: 112rpx;
				height: 48rpx;
				color: #333;
				background-color: #FFD425;
				border-radius: 28rpx;
			}

			.active {
				color: #333;
				background-color: rgba(192, 192, 192, 0.4);
			}
		}
	}

	.index {

		// 轮播
		.BannerView {
			/*  #ifdef  MP-WEIXIN  */
			position: absolute;
			top: 0;
			/* #endif */
			width: 100%;

			.Banner {
				height: 500rpx;
				background: #000;
				position: relative;

				.ViewDot {
					position: absolute;
					bottom: 20rpx;
					right: 32rpx;
					padding: 6rpx 24rpx;
					background: rgba(0, 0, 0, 0.5);
					border-radius: 22rpx;

					.ViewDotItem {
						font-size: 22rpx;
						font-weight: 500;
						color: #FFFFFF;
					}
				}
			}

			.BannerDot {
				display: flex;
				align-items: center;
				background: rgba(255, 255, 255, 0.6);
				width: max-content;
				border-radius: 22rpx;
				position: absolute;
				top: 440rpx;
				// bottom: 20rpx;
				left: 50%;
				transform: translate(-50%, 0%);
				overflow: hidden;
				font-weight: 500;

				.BannerDotItem {
					font-size: 22rpx;
					font-weight: 500;
					color: #333333;
					padding: 6rpx 24rpx;
					border-radius: 22rpx;
					opacity: 1;
				}

				.Click {
					background: #FFD425;
				}
			}
		}

		// 信息
		.Message {
			/*  #ifdef  MP-WEIXIN  */
			margin: 400rpx 36rpx 40rpx 36rpx;
			/*  #endif  */

			/*  #ifdef  H5 */
			margin: 40rpx 36rpx 40rpx 36rpx;
			/*  #endif  */

			/*  #ifdef APP-PLUS */
			margin: 40rpx 36rpx 40rpx 36rpx;
			/*  #endif  */

			.MessageTitle {
				margin-bottom: 12rpx;
				font-size: 44rpx;
				font-weight: 600;
				color: #333333;
			}

			.MessageTips {
				display: flex;
				align-items: center;
				margin-bottom: 20rpx;

				.MessageNow {
					background: #C64843;
					font-size: 18rpx;
					color: #FFFFFF;
					padding: 4rpx 8rpx;
					width: max-content;
					border-radius: 4rpx;
					margin-right: 12rpx;
				}

				.MessageList {
					background: #F0F0F0;
					font-size: 18rpx;
					color: #333333;
					padding: 4rpx 8rpx;
					width: max-content;
					border-radius: 4rpx;
					margin-right: 12rpx;
				}
			}

			.MessageData {
				display: flex;
				align-items: center;
				margin-bottom: 20rpx;

				.MessageOne {
					padding-right: 26rpx;
					margin-right: 24rpx;
					border-right: 1rpx solid #EFEFEF;

					.MessageRed {
						font-size: 26rpx;
						font-weight: 600;
						color: #C64843;
						margin-bottom: 10rpx;
						text-align: center;
					}

					.MessageText {
						font-size: 26rpx;
						font-weight: 600;
						color: #333333;
						margin-bottom: 10rpx;
						text-align: center;
					}

					.MessageMian {
						font-size: 22rpx;
						font-weight: 400;
						color: #939393;
						text-align: center;
					}
				}
			}

			.MessageOpen {
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-bottom: 30rpx;

				.MessageNav {
					font-size: 24rpx;
					font-weight: 400;
					color: #333333;

					.MessageNavText {
						color: #939393;
					}
				}

				.MessageIcon {
					width: 56rpx;
					height: 56rpx;
				}
			}
		}

		// 图标列表
		.IconView {
			margin: 40rpx 36rpx;

			.IconList {
				display: flex;
				align-items: center;
				justify-content: space-between;
				flex-wrap: wrap;
				padding: 38rpx 0rpx 6rpx 0rpx;
				background: #F9F6F3;
				box-shadow: 0rpx 6rpx 12rpx rgba(0, 0, 0, 0.06);
				border-radius: 8rpx;

				.IconItem {
					display: flex;
					flex-direction: column;
					align-items: center;
					justify-content: center;
					width: 25%;
					margin-bottom: 32rpx;

					.IconImage {
						width: 48rpx;
						height: 48rpx;
						margin-bottom: 16rpx;
					}

					.IconTitle {
						font-size: 24rpx;
						font-weight: 400;
						color: #333333;
					}
				}
			}
		}

		// 视频列表
		.livePlay {
			margin-top: 24rpx;
			padding: 0 0rpx 0 28rpx;

			// background: FFFFFF;
			.livePlayView {
				overflow: hidden;

				.livePlayMain {
					white-space: nowrap;
					overflow-x: auto;

					.livePlayItem {
						margin-right: 24rpx;
						display: inline-block;

						.livePlaybg {
							width: 324rpx;
							height: 170rpx;
							border-radius: 8rpx;
							position: relative;
							overflow: hidden;
							padding: 42rpx 24rpx 0 24rpx;

							.livePlay_left {
								display: flex;
								flex-direction: column;
								justify-content: space-between;
								height: 100%;

								.livePlay_title {
									font-size: 24rpx;
									font-weight: 400;
									line-height: 44rpx;
									color: #FFFFFF;
								}

								.livePlay_des {
									font-size: 16rpx;
									font-weight: 400;
									color: #A7A5A4;
									padding: 2rpx 8rpx;
									background: #fff;
									border-radius: 2rpx;
									width: max-content;
								}

								.livePlay_message {
									font-size: 16rpx;
									font-weight: 400;
									line-height: 44rpx;
									color: #FFFFFF;
								}

							}

							.livePlay_leftTop {
								background: rgba(0, 0, 0, .2);
								color: #fff;
								font-size: 20rpx;
								padding: 4rpx 12rpx;
								border-radius: 30rpx;
								position: absolute;
								top: 8rpx;
								left: 12rpx;
								display: flex;
								align-items: center;

								.livePlay_ing {
									width: 8rpx;
									height: 8rpx;
									border-radius: 50%;
									background-color: #0EE36A;
									margin-right: 8rpx;
									margin-bottom: 2rpx;
								}

								.livePlay_back {
									width: 12rpx;
									height: 12rpx;
									margin-right: 8rpx;
								}

								.livePlay_text {
									font-size: 16rpx;
									color: #fff;
								}
							}

							.livePlay_rightTop {
								background: linear-gradient(171deg, #EFE8CF 0%, #F4CE9C 100%);
								border-radius: 0rpx 8rpx 0rpx 8rpx;
								position: absolute;
								top: 0rpx;
								right: 0rpx;
								font-size: 16rpx;
								font-weight: 400;
								color: #333333;
								padding: 8rpx 8rpx;
							}

						}
					}
				}
			}
		}

		// 户型推荐
		.RoomView {
			margin: 30rpx 0rpx 0 0;

			.RoomList {
				margin: 0rpx 40rpx 32rpx 40rpx;
				display: flex;
				align-items: center;
				flex-wrap: wrap;

				.RoomItem {
					padding: 2rpx 12rpx;
					font-size: 28rpx;
					color: #939393;
					margin-right: 32rpx;

					border: 2rpx solid #939393;
					border-radius: 4rpx;
					width: max-content;
				}

				.RoomItemClick {
					background: #C3AB7C;
					border-color: #C3AB7C;
					color: #fff;
				}
			}

			.i_rCan {
				// height: 332rpx;
				overflow: hidden;
			}

			.i_rList {
				padding: 0 0rpx 36rpx 36rpx;
				white-space: nowrap;
				overflow-x: auto;
			}

			.i_rItem {
				// width: 3;
				margin-right: 16rpx;
				display: inline-block;
				background: #FFFFFF;
				box-shadow: 0rpx 0rpx 16rpx rgba(0, 0, 0, 0.06);
				border-radius: 0rpx 0rpx 8rpx 8rpx;
			}

			.i_rImage {
				width: 334rpx;
				height: 334rpx;
				border-radius: 8rpx;
				background: #f6f7fb;
				position: relative;
				overflow: hidden;
			}

			.TextView {
				padding: 20rpx 16rpx;
			}

			.i_rText {
				// width: 340rpx;
				font-size: 30rpx;
				font-weight: 500;
				color: #0A0605;
				margin-bottom: 8rpx;
			}

			.i_rFee {
				font-size: 26rpx;
				font-weight: 500;
				color: #C3AB7C;
			}

		}

		//装修案例
		.renovation {
			background: #fff;
			padding-top: 12rpx;
			padding-bottom: 12rpx;
			margin-bottom: 12rpx;

			.coupon_Column_List {
				white-space: nowrap;
				padding: 0rpx 20rpx 10rpx 32rpx;
				background: #fff;
				position: relative;
				z-index: 1;

				.scoll-wrapper {
					display: flex;
					align-items: flex-start;
					// margin-bottom: 30rpx;
					background: #fff;
					padding-top: 10rpx;
					padding-bottom: 10rpx;
					padding-left: 10rpx;

					// height: 200rpx;
					.floor-item {
						margin-right: 16rpx;
						box-shadow: 0rpx 3rpx 16rpx rgba(0, 0, 0, 0.06);
						border-radius: 8rpx;
						width: 332rpx;

						// overflow: hidden;
						.ItemImage {
							width: 332rpx;
							height: 276rpx;
							border-radius: 8rpx;
							overflow: hidden;
						}

						.Itemtext {
							padding: 0 10rpx 10rpx 10rpx;

							.ItemMes {
								font-size: 20rpx;
								font-weight: 400;
								color: #939393;
								margin: 16rpx 0;
							}

							.ItemTitle {
								white-space: pre-line;
								font-size: 24rpx;
								font-weight: 400;
								color: #333333;
							}
						}

						.designView {
							display: flex;
							padding: 20rpx 20rpx 20rpx 10rpx;

							.designImage {
								width: 64rpx;
								height: 64rpx;
								border-radius: 50%;
								overflow: hidden;
								margin-right: 12rpx;
							}

							.designTitle {
								font-size: 24rpx;
								font-weight: 600;
								color: #333333;
							}

							.designMes {
								font-size: 20rpx;
								font-weight: 400;
								color: #939393;
								margin: 6rpx 0 20rpx 0;
							}

							.designPirce {
								font-size: 28rpx;
								font-weight: 600;
								color: #333333;

								text {
									font-size: 20rpx;
									font-weight: 400;
									color: #333333;
									margin-left: 8rpx;
								}
							}
						}

						.designTips {
							display: flex;
							align-items: center;
							padding: 0 24rpx 24rpx 24rpx;

							.designItem {
								font-size: 20rpx;
								font-weight: 400;
								color: #A98F68;
								padding: 4rpx 20rpx;
								background: #F9F6F3;
								border-radius: 18rpx;
								width: max-content;
								margin-right: 20rpx;
							}
						}

						.homeImage {
							width: 284rpx;
							height: 284rpx;
							border-radius: 8rpx;
							overflow: hidden;
							margin: 24rpx;

						}

						.homeView {
							padding: 0 24rpx 20rpx 24rpx;

							.homeTitle {
								white-space: pre-line;
								margin-bottom: 18rpx;
								font-size: 24rpx;
								font-weight: 500;
								color: #333333;
							}

							.homePirce {
								font-size: 32rpx;
								font-weight: 600;
								color: #C3AB7C;
							}
						}
					}
				}
			}
		}

		// 用户评价
		.comment {
			background: #fff;
			padding-bottom: 20rpx;
			padding-top: 12rpx;

			.commentList {
				margin: 0 32rpx 40rpx 32rpx;
				padding-bottom: 40rpx;
				border-bottom: 1px solid #F4F4F4;

				.commentTop {
					display: flex;
					align-items: center;
					justify-content: space-between;

					.commentHead {
						display: flex;
						align-items: center;

						.commentimage {
							width: 84rpx;
							height: 84rpx;
							border-radius: 50%;
							overflow: hidden;
							margin-right: 20rpx;
						}

						.commentName {
							font-size: 28rpx;
							font-weight: 600;
							color: #333333;
						}
					}

					.commentTime {
						font-size: 24rpx;
						font-weight: 400;
						color: #939393;
					}
				}

				.commentMain {
					margin: 28rpx 0;
					font-size: 28rpx;
					font-weight: 400;
					color: #333333;
				}

				.commentBottom {
					display: flex;

					.commentPic {
						width: 220rpx;
						height: 220rpx;
						border-radius: 8rpx;
						overflow: hidden;
						margin-right: 14rpx;
					}
				}
			}
		}

		// 大家再问
		.problem {
			padding-top: 12rpx;
			background: #fff;
			margin-top: 8rpx;
			padding-bottom: 24rpx;

			.problemView {
				margin: 32rpx 32rpx;

				.problemItem {
					display: flex;
					align-items: flex-start;
					margin-bottom: 32rpx;

					.problemIcon {
						padding: 2rpx 6rpx;
						font-size: 20rpx;
						font-weight: 500;
						color: #FFFFFF;
						background: linear-gradient(180deg, #FFCC60 0%, #FA8D38 100%);
						border-radius: 4rpx;
						width: max-content;
						margin-right: 12rpx;
						margin-top: 4rpx;
					}

					.problemTitle {
						font-size: 28rpx;
						font-weight: 400;
						color: #333333;
						margin-bottom: 12rpx;
					}

					.problemBack {
						display: flex;
						align-items: center;
						justify-content: space-between;
						flex: 1;
					}

					.problemReturn {
						font-size: 24rpx;
						font-weight: 400;
						color: #939393;
						flex: 1;
						margin-right: 60rpx;
					}

					.problemNum {
						color: #333333;
						font-size: 24rpx;
						font-weight: 400;

						text {
							color: #939393;
						}
					}
				}
			}
		}
	}
</style>
